<template>
    <div class="flex p-3">
      <batchImportTree
        @update:selected-value="handleSelectedValueUpdate"
        @update:node-id="handleNodeIdUpdate"
      />
      <batchImportTable :selected-node-id="selectedNodeId" />
    </div>
  </template>
  <script lang="ts" setup>
  import batchImportTree from "./components/batchImportTree.vue";
  import batchImportTable from "./components/batchImportTable.vue";
  import { ref } from "vue";
  // 定义一个 ref 来存储从 customerTree 接收到的值
  const selectedValue = ref("");
  // 定义一个 ref 来存储选中节点的ID
  const selectedNodeId = ref<null | string>(null);
  
  // 定义处理 customerTree 事件的方法
  const handleSelectedValueUpdate = (value: string) => {
    selectedValue.value = value;
  };
  
  // 定义处理节点选择的方法
  const handleNodeIdUpdate = (id: string) => {
    selectedNodeId.value = id;
  };
  </script>
  <style scoped></style>
  